﻿using MVC_seed.Data;
using MVCTest003.Models;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace MVCTest0003.Models
{
    public class ModelDataInitializerSeed:System.Data.Entity.DropCreateDatabaseAlways<MusicStoreDB>  //DropCreateDatabaseIfModeChanges
    {
        protected override void Seed(MusicStoreDB context)
        {
            context.Artists.Add(new Artist { Name = "岁岁常相见" });
            context.Genres.Add(new Genre { Name = "流行", Description = "流行音乐很流行" });

            base.Seed(context);
        }
            
    }

    
}